$(document).ready(function(){
	$.ajax({
		url:"../queryRule",
		data:new Date(),
		type:"GET",
		success:function(data){
			console.log(data);
			makeRuleSelect(data);
		}
	})
	function makeRuleSelect(data){
		$("#rule").empty();
		var option=$("<option></option>").append("请选择考勤方式").val(0);
			option.appendTo("#rule")
		$.each(data.extend.rules,function(index,item){
			var option=$("<option></option>").attr("id",item.ruleid).append(item.rulename).val(item.deal);
			option.appendTo("#rule");
		});
	}
})